import random

import pytest
# import requests
from commons.sessions import Session


# @pytest.fixture(scope="session")
# def session():
#     yield requests.Session()

@pytest.fixture(scope="session")
def session():
    yield Session()


# @pytest.fixture(scope="session")
@pytest.fixture(scope="class")
def f():
    print("启动浏览器")  # 前置操作
    # yield "来自fixture的数据"
    # yield random.randint(10, 9999)
    yield []
    print("关闭浏览器")  # 后置操作


# 不重复的变量
@pytest.fixture(scope="session")
def time_1():
    yield random.randint(100000, 999999999999)


@pytest.fixture(scope="session")
def time_2():
    yield random.randint(999999999999, 99999999999999)
